@extends('admin.layouts.common')
@section('container')
    <div class="container">
        <div class="jumbotron">
            <div class="container">
                <center><h1>登录</h1></center>
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 col-md-offset-4 col-sm-offset-3">
                    <form action="" method="post" role="form">
                        {{ csrf_field() }}
                        <div class="form-group">
                            <label for="">用户名</label>
                            <input type="text" class="form-control" value="{{session('username')}}" name="username"
                                   id=""
                                   placeholder="Input...">
                        </div>
                        <div class="form-group">
                            <label class="" for="">密码</label>
                            <input type="text" class="form-control" name="password" id="" placeholder="Input...">
                        </div>

                        <button type="submit" class="btn btn-primary">提交</button>
                    </form>
                </div>
            </div>

        </div>
    </div>

    @if (count($errors) > 0)
        <div class="modal fade" id="modal-id">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">消息提示</h4>
                    </div>
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-xs-2"><i class="fa fa-info-circle fa-5x text-danger"></i></div>
                            <div class="alert alert-danger col-xs-9">
                                @foreach ($errors->all() as $error)
                                    {{ $error }}<br>
                                @endforeach
                            </div>
                        </div>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        <script>
            $("#modal-id").modal('show')
            setTimeout(function () {
                $('#modal-id').modal('hide')
            }, 2000);
        </script>
    @endif
@endsection